package com.example.japinhands.ui.screen

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.navigation.NavController
import com.example.japinhands.data.DeformAdj
import com.example.japinhands.data.DeformVerb
import com.example.japinhands.data.Word
import com.example.japinhands.data.WordConstant.ADJECTIVE_1
import com.example.japinhands.data.WordConstant.ADJECTIVE_2
import com.example.japinhands.data.WordConstant.VERB_1
import com.example.japinhands.data.WordConstant.VERB_2
import com.example.japinhands.data.WordConstant.VERB_3
import com.example.japinhands.route.Route

@Composable
fun TestWordDetailScreen(
    word: Word,
    adj: DeformAdj,
    verb: DeformVerb,
    navController: NavController
) {
    Column {
        Text(text = word.kanji)
        Text(text = word.gana)
        Text(text = word.meaning)
        Text(text = word.notice)
        Text(text = word.sentenceContent)
        when (word.type) {
            VERB_1, VERB_2, VERB_3 -> {
                Text(text = verb.toString())
            }

            ADJECTIVE_1, ADJECTIVE_2 -> {
                Text(text = adj.toString())
            }
        }
        Button(
            onClick = {
//                navController.navigate(Route.TestUpdateWord.createRoute(word.id))
                navController.navigate(Route.UpdateWord.createRoute(word.id))
            }
        ) {
            Text(text = "修改单词")
        }
    }

}